<div id="consilience_document_form">
<% form_for(:document, @document, :url => {:controller => "document", :action => "update"}) do |f| %>
<%= render :partial => "form", :locals => {:f => f} -%>
<%= f.submit t("form.btn_submit_write")%>
<% end %>
<dl>
  <dt><%= t "document.form_applied_javascript" -%></dt><dd id="container_attached_javascript">
<%= render :partial => "decorates/list", :locals => { :decorates => @document.javascripts, :name => "javascript", :document => @document } -%>
  </dd>
  <dt><%= t "document.form_applied_stylesheet" -%></dt><dd id="container_attached_stylesheet">
<%= render :partial => "decorates/list", :locals => { :decorates => @document.stylesheets, :name => "stylesheet", :document => @document } -%>
  </dd>
  <dt>적용할 수 있는 자바스크립트/스타일시트</dt><dd>
    <ul>
      <li><%= collection_select :decorate, :javascript, Decorate.javascripts, :id, :name, { :prompt => "자바스크립트 선택하세요." } %><%= link_to_function "추가", "requestAdd(#{@document.id}, 'javascript');" -%></li>
      <li><%= collection_select :decorate, :stylesheet, Decorate.stylesheets, :id, :name, { :prompt => "스타일시트 선택하세요." } %><%= link_to_function "추가", "requestAdd(#{@document.id}, 'stylesheet')" -%></li>
    </ul>   
  </dd>
</dl>
</div>
<%= render :partial => "help" -%>
